﻿namespace Example
{
    using Autofac;
    using Autofac.Configuration;

    using AutofacContrib.CommonServiceLocator;

    using Microsoft.Practices.ServiceLocation;

    public static class IoC
    {
        public static void Configure()
        {
            var builder = new ContainerBuilder();
            builder.RegisterModule(new ConfigurationSettingsReader());
            var locator = new AutofacServiceLocator(builder.Build());

            ServiceLocator.SetLocatorProvider(() => locator);
        }
    }
}